using UnityEngine;

public class HUDControlAvto : MonoBehaviour
{
	public GameObject hudButton;

	public GameObject hudAuto;

	public GameObject hudJoystic;

	public GameObject hudCamera;

	private void OnEnable()
	{
		if ((bool)PlayerBehavior.MyPlayer && (bool)PlayerBehavior.MyPlayer.currentCar && (PlayerBehavior.MyPlayer.currentCar.Type == CarType.Tank || PlayerBehavior.MyPlayer.currentCar.Type == CarType.Titan))
		{
			hudJoystic.SetActive(true);
			hudButton.SetActive(false);
			hudAuto.SetActive(false);
			hudCamera.SetActive(false);
			return;
		}
		if (settings.typeControlerCar == TypeControlCar.button)
		{
			hudButton.SetActive(true);
			hudAuto.SetActive(false);
			hudJoystic.SetActive(false);
			hudCamera.SetActive(false);
		}
		if (settings.typeControlerCar == TypeControlCar.wheel)
		{
			hudJoystic.SetActive(true);
			hudButton.SetActive(false);
			hudAuto.SetActive(false);
			hudCamera.SetActive(false);
		}
		if (settings.typeControlerCar == TypeControlCar.camera)
		{
			hudJoystic.SetActive(false);
			hudButton.SetActive(false);
			hudAuto.SetActive(false);
			hudCamera.SetActive(true);
		}
	}

	public void UpdateInterface()
	{
		OnEnable();
	}
}
